package com.fitsoftwareprocess.mobilemap;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class StreetActivity extends Activity implements OnClickListener{
	private EditText editTextAddress1;
	private EditText editTextAddress2;
	private Button buttonFind;

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_street);
        editTextAddress1 = (EditText)findViewById(R.id.editTextAddress1_Street);
        editTextAddress2 = (EditText)findViewById(R.id.editTextAddress2_Street);
        buttonFind = (Button)findViewById(R.id.buttonFind_Street);
        buttonFind.setOnClickListener(this);
        
	}

	public void onClick(View view) {
		Intent intent;
		switch (view.getId()) {
		case R.id.buttonFind_Street:
			intent = new Intent(this, ResultStartPointActivity.class);
			intent.putExtra("startkeyword",editTextAddress1.getText().toString());
			intent.putExtra("endkeyword",editTextAddress2.getText().toString());
			intent.putExtra("tab",0);
			startActivity(intent);
			startActivity(intent);
			break;

		default:
			break;
		}
	}

}
